<template>
  <div class="container-com-b">
      <button @click="fn">点击传值</button>
  </div>
</template>

<script>
import eventBus from '@/eventBus'
export default {
    name:'com-b',
    data(){
        return{
            tip:'b的数据'
        }
    },
    methods:{
        fn(){
            eventBus.$emit('b2a',this.tip)
        }
    }

}
</script>

<style>

</style>